<div class="col-xs-12 col-sm-12 col-md-12 col-lg-12">
	
	<!-- END RIBBON -->
	<div class="content">
		<div class="panel panel-default panel-intro">
			<div class="panel-heading">
				<div class="panel-lead">
					<em>
						进程列表管理
					</em>
					进程总数：{:count($list)} 个
				</div>
			</div>
			<div class="panel-body">
				<div id="myTabContent" class="tab-content">
					<div class="tab-pane fade active in" id="one">
						<div class="widget-body no-padding">
							<div class="bootstrap-table">

								<div class="fixed-table-toolbar">
									<div class="bs-bars pull-left">
										<div id="toolbar" class="toolbar">
											<a href="javascript:window.location.reload();" class="btn btn-primary btn-refresh" title="刷新">
												<i class="fa fa-refresh"></i>
                                            </a>
										</div>
									</div>
									<div class="columns columns-right btn-group pull-right">
										
										<div class="keep-open btn-group" title="列">
											<button type="button" aria-label="columns" class="btn btn-default dropdown-toggle" data-toggle="dropdown">
												<i class="glyphicon glyphicon-th icon-th"></i>
												<span class="caret"></span>
											</button>
											<ul class="dropdown-menu" id="table_menu">
												
											</ul>
										</div>
                                        
									</div>
								</div>
								<div class="fixed-table-container">
									<div class="fixed-table-body">
										<table id="table" class="table table-striped table-bordered table-hover"
										data-operate-edit="1" data-operate-del="1" width="100%">
										{foreach name="list" item="vo" key="k" }
											{if condition="$k eq 0"}
												<thead>
													<tr>
														{foreach name="vo" item="val" key="key"}
														<th data-status="1"><div class="th-inner">{$val}</div></th>
														{/foreach}
														<th data-status="1"><div class="th-inner">操作</div></th>
													</tr>
												</thead>
												<tbody>
											{else /}
												<tr class="del-{$vo.1}">
													{foreach name="vo" item="val" key="key"}
													<td align="left">{$val}</td>
													{/foreach}
													<td align="center">
														{if condition="$adminController->vif('database','process_delete')"}
															<a data-id="{$vo.1}" class="btn btn-xs btn-success btn-editone process_delete" title="强制杀死">强制杀死</a>
														{/if}
													</td>
												</tr>
											{/if}
										{/foreach}
												</tbody>
										</table>
									</div>
								</div>
							</div>
						</div>
					</div>
				</div>
			</div>
		</div>
	</div>
</div>

								
<script>
layui.use(['form'], function(){
  var form = layui.form;
});

// 删除
$(".process_delete").on('click', function(){
    if (confirm('确认强制杀死该进程吗')) {
        var id   = $(this).attr('data-id');
        var data = {'id':id};

        $.ajax({
            type: 'post',
            data:data,
            url: "{:url('database/process_delete')}",
            success: function(data) {
                var array = eval('('+data+')');
				if (array['code'] == '01') {
					$.thinkmimi({Content : array['msg'], Type:2, Align:'right', OutTime:2000});
				} else {
					$.thinkmimi({Content : array['msg'], Type:1, Align:'right', OutTime:2000});
					$('.del-'+id).remove();
				}
            }
        });
    }
});
</script>
